/*
 * Created on 2004-04-26
 */
package org.opencube.data;

import java.io.Serializable;

/**
 * <p>This class represents the statement bound variable.
 * <p>The variables are identified by name.
 * 
 * @author <a href="mailto:maciek@fingo.pl">FINGO - Maciej Mroczko</a>
 */
public class BoundVariable implements Serializable
{
	/**
	 * 
	 */
	/* The variable name */
	private String name = "";
	/* The value of the variable */
	private Object value = new Object();
	
	/**
	 * Default constructor
	 */
	public BoundVariable()
	{
		super();
	}
	
	/**
	 * Full constructor
	 * 
	 * @param name the variable name
	 * @param value the variable value
	 */	
	public BoundVariable( String name, Object value )
	{
		this.name = name;
		this.value = value;
	}
	
	/**
	 * Returns the name of this variable
	 * 
	 * @return The variable name
	 */
	public String getName()
	{
		return this.name;
	}

	/**
	 * Sets the name for this variable
	 * 
	 * @param name the name for this varibale
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * Return the value of this variable
	 * 
	 * @return The value of this variable
	 */
	public Object getValue()
	{
		return this.value;
	}

	/**
	 * Sets the value for this variable
	 * 
	 * @param value the value for this variable
	 */
	public void setValue(Object value)
	{
		this.value = value;
	}

}
